package com.yuntai.pms.model.enums;

import java.util.LinkedHashMap;
import java.util.Map;

public enum YesOrNoType {

    YES("Y", "是"),
    NO("N", "否");

    private String code;
    private String name;
    private final  static Map<String,String> yesNoMap = new LinkedHashMap<String,String>();

    public static Map<String, String> getYesNoMap() {
        return yesNoMap;
    }

    static   {
        yesNoMap.put(YesOrNoType.YES.getCode(), YesOrNoType.YES.getName());
        yesNoMap.put(YesOrNoType.NO.getCode(), YesOrNoType.NO.getName());
    }
    private YesOrNoType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
